/**
 * @module        vuex
 * @author      nayo
 * @date        2020/9/23 4:04 下午
 * @version     1.0
 */
import Vue from 'vue';
import Vuex from 'vuex';
import VuexLocalSync from '@/store/plugins/VuexStorage';
import User from '@/store/modules/_User';
import Setting from '@/store/modules/_Setting';
import Menu from '@/store/modules/_Menu';

Vue.use(Vuex);

const VueLocalSyncPlugin = new VuexLocalSync({
	key: 'store'
});

const modules = {
	User,
	Setting,
	Menu
};

export default new Vuex.Store({
	modules,
	plugins: [VueLocalSyncPlugin.plugin]
});
